<%@ Page Title="Teachers" Language="C#" MasterPageFile="~/masterpage.master" AutoEventWireup="true" CodeFile="teachers.aspx.cs" Inherits="Admin_teachers" %>

<%@ Register src="ucLetters.ascx" tagname="ucLetters" tagprefix="uc2" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

<script language="javascript">
	  function changeCB(control) {
	
		  var controls = document.getElementsByTagName("INPUT");

		  for (i = 0; i < controls.length; i++) {
			  if (controls[i] == control)
				  continue;
	
			  if (controls[i].type == 'checkbox') {
				  controls[i].checked = control.checked;
			  }
		  }


	  }

	  var controldivname = 'ctl00_ContentPlaceHolder1_rgTeachers';
	  offset = 600;
</script>

<link rel="stylesheet" type="text/css" href="css/admin.css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
	<table width="95%" cellpadding="0" cellspacing="0">
<tr>

<td align="center" >

<table width="95%">
<tr>

<td colspan="2">
		<div class="wrap4"><div class="abcd">

	<table width= "100%"><tr>
		<td align="center" style="width:800px;">
		
		<uc2:ucLetters ID="ucLetters1" Format="teachers.aspx?letter={0}" runat="server" /></td>
		
		<td align=right><asp:ImageButton ImageUrl="Images/excel_icon2.png" ID="lbExport" runat="server" 
		onclick="lbExport_Click" ToolTip="Export to Excel" ></asp:ImageButton></td>
		</tr>
	</table>
	
<div class="clr"></div>
</div></div>
<div class="clr"></div>


</td>
</tr>

<tr>
<td align=left>

<telerik:radscriptmanager ID="RadScriptManager1" Runat="server">
	</telerik:radscriptmanager>
<telerik:radgrid ID="rgTeachers" runat="server" AllowPaging="True" 
		AllowSorting="True" Height="400px"  Width="100%"
	 CssClass="stats"	onsortcommand="rgTeachers_SortCommand" 
		onpageindexchanged="rgTeachers_PageIndexChanged"  GridLines="None" 
		AllowAutomaticUpdates="True" AutoGenerateColumns="False" onitemdatabound="rgTeachers_ItemDataBound"
		>
		
		<HeaderStyle Font-Size=9 HorizontalAlign=Center  Font-Bold="True" Font-Underline="false" />
 
            <ItemStyle BackColor="Silver" />
	<AlternatingItemStyle BackColor="LightGray" />

            <MasterTableView DataKeyNames="ID">
				<Columns>
				<telerik:GridTemplateColumn>
				<HeaderStyle HorizontalAlign=Left />
				<HeaderTemplate>
					<input id="Checkbox1"   onclick ="changeCB(this);" type="checkbox" />
				</HeaderTemplate>
				<ItemTemplate>
					<asp:CheckBox ID="CheckBox1" runat="server" />
				</ItemTemplate>
				<EditItemTemplate>
					<asp:CheckBox ID="CheckBox1" runat="server" />
				</EditItemTemplate>
			</telerik:GridTemplateColumn>
			<telerik:GridBoundColumn DataField="ID" HeaderText="ID" SortExpression="ID" >
				<ItemStyle HorizontalAlign=Center />
			</telerik:GridBoundColumn>
			<telerik:GridBoundColumn DataField="FIRST_NAME" SortExpression="FIRST_NAME" HeaderText="First Name" />
			<telerik:GridBoundColumn DataField="MIDDLE_NAME" SortExpression="MIDDLE_NAME" HeaderText="Middle Name" />
			<telerik:GridBoundColumn DataField="LAST_NAME" SortExpression="LAST_NAME" HeaderText="Last Name" />
			<telerik:GridBoundColumn DataField="USER_NAME" SortExpression="USER_NAME" HeaderText="User Name" />
			<telerik:GridBoundColumn DataField="EMAIL" SortExpression="EMAIL" HeaderText="Email" />
			
			<telerik:GridTemplateColumn HeaderText="Admin" ItemStyle-HorizontalAlign=Center SortExpression="IS_ADMIN">
				<ItemTemplate>
					<asp:Image ID="Image1" ImageUrl="~/Images/tick_icon.png" runat="server" />
				</ItemTemplate>
				<EditItemTemplate>
					<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
				</EditItemTemplate>
				<ItemStyle HorizontalAlign="Center" />
			</telerik:GridTemplateColumn>
			
		</Columns>
	</MasterTableView>

            <ClientSettings>
                <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True"></Scrolling>
            </ClientSettings>

</telerik:radgrid>

	</td>
</tr>
</table>
	
	</td></tr></table>
	
	<div class="clr4"></div>
<div class="clr3">

<table width="90%">
<tr><td align="right">
<table><tr><td><div class="reset_pass_float">

      <label><asp:Button ID="reset_pass" runat="server" CssClass="reset_pass" 
		onclick="bResetPassword_Click" />
        
      </label>
    </div></td><td><div class="grant_admin_float">

      <label><asp:Button ID="grant_admin" CssClass="grant_admin" runat="server"  
		onclick="bGrantAdmin_Click" />
      
      </label>
    </div></td><td>  <div class="revoke_admin_float">
      <label>
      	<asp:Button ID="revoke_admin" runat="server" CssClass="revoke_admin"  
		onclick="bRevokeAdmin_Click" />
      </label>
    </div></td></tr></table>
    
  </td></tr></table>

    
    <div class="clr5">
</div></div>


	
	

</asp:Content>


